package qianting.news.article.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import qianting.news.apis.models.article.dtos.ArticleInfoDto;
import qianting.news.article.service.ApArticleService;
import qianting.news.common.entity.State;
import qianting.news.common.utils.AppThreadLocalUtil;

@Api(tags = "文章行为管理")
@RestController
@RequestMapping("/")
public class ArticleBehaviorController {

    @Autowired
    private ApArticleService apArticleService;

    //加载文章行为
    @ApiOperation(value = "加载文章行为")
    @PostMapping("/load_article_behavior")
    public State loadArticleBehavior(@RequestBody ArticleInfoDto dto){
        return apArticleService.loadArticleBehavior(dto);
    }

}
